import { BaseWindow } from "../../../component/window/BaseWindow";
import { ILayer } from "../../../mvc/interfaces/ILayer";
import { Language } from "../../../../extend/language/Language";
import { ObjCreate } from "../common/ObjCreate";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { ImagesConst } from "../../resource/ImagesConst";
import { GuildConfig } from "../../resource/GuildConfig";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
import { GuildUtil } from "./info/GuildUtil";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
type int = number;
//class GuildPosDescWindow
    
    export  class GuildPosDescWindow extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(475, 425);
            this.titleHeight = 28;
            this.title = Language.getString(57597);
            return;
        }

        protected /* override */ createChildren(): void
        {
            var loc1=null;
            var loc2=null;
            var loc3=null;
            var loc4=null;
            var loc5=0;
            var loc8=null;
            var loc9=null;
            var loc10=null;
            var loc11=null;
            super.createChildren();
            ObjCreate.createBg(17, 39, 440, 375, this);
            ObjCreate.createTextField(Language.getString(57326), 35, 45, 80, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createTextField(Language.getString(57598), 135, 45, 80, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createTextField(Language.getString(57599), 245, 45, 80, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createTextField(Language.getString(57600), 350, 45, 80, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createBg(17, 65, 440, 2, this, ImagesConst.SplitLine);
            var loc6=0;
            while (loc6 < 10) 
            {
                loc5 = loc6 + 1;
                loc4 = GuildConfig.instance.getConfigByLevel(loc5);
                loc1 = ObjCreate.createTextField("", 50, 70 + loc6 * 20, 80, 20, this);
                loc1.htmlText = HTMLUtil.addColor(loc5.toString(), GuildUtil.getGuildTreeColor(loc5));
                loc2 = ObjCreate.createTextField("", 160, 70 + loc6 * 20, 80, 20, this);
                loc2.text = loc4.deputyNum.toString();
                loc3 = ObjCreate.createTextField("", 270, 70 + loc6 * 20, 80, 20, this);
                loc3.text = loc4.presbyterNum.toString();
                ObjCreate.createBg(17, 85 + loc6 * 20, 285, 2, this, ImagesConst.SplitLine);
                ++loc6;
            }
            var loc7=new GTextFormat(FontUtil.songtiName, 12, 65280, true);
            ObjCreate.createTextField(Language.getString(57601), 35, 280, 80, 20, this, loc7);
            ObjCreate.createTextField(Language.getString(57602), 135, 280, 80, 20, this, loc7);
            ObjCreate.createTextField(Language.getString(57603), 245, 280, 80, 20, this, loc7);
            (loc8 = ObjCreate.createTextField("", 35, 300, 80, 20, this)).multiline = true;
            loc8.autoSize = flash.text.TextFieldAutoSize.LEFT;
            loc8.htmlText = Language.getString(57604);
            (loc9 = ObjCreate.createTextField("", 145, 300, 80, 20, this)).multiline = true;
            loc9.autoSize = flash.text.TextFieldAutoSize.LEFT;
            loc9.htmlText = Language.getString(57605);
            (loc10 = ObjCreate.createTextField("", 245, 300, 80, 20, this)).multiline = true;
            loc10.autoSize = flash.text.TextFieldAutoSize.LEFT;
            loc10.htmlText = Language.getString(57606);
            ObjCreate.createFlowerBg(312, 66, 145, 347, this);
            (loc11 = ObjCreate.createTextField("", 320, 90, 135, 280, this)).wordWrap = true;
            loc11.multiline = true;
            loc11.autoSize = flash.text.TextFieldAutoSize.LEFT;
            loc11.htmlText = Language.getString(57607);
            loc11.mouseEnabled = false;
            loc11.mouseWheelEnabled = false;
            ObjCreate.createTextField(Language.getString(57608), 333, 390, 90, 20, this, GlobalStyle.textFormat6);
            this._guildLevelTxt = ObjCreate.createTextField("", 420, 390, 90, 20, this, GlobalStyle.textFormatGreen);
            return;
        }

        public updateLevel(arg1: int): void
        {
            this._guildLevelTxt.text = Language.getStringByParam(61039, arg1);
            return;
        }

        /* internal */ /* var */_guildLevelTxt: Object /* flash.text.TextField */;
    }
